# +----------------------------------------------------------------------
# | ChatWork智能聊天办公系统
# +----------------------------------------------------------------------
# | 软件声明: 本系统并非自由软件,未经授权任何形式的商业使用均属非法。
# | 版权保护: 任何企业和个人不允许对程序代码以任何形式任何目的复制/分发。
# | 授权要求: 如有商业使用需求,请务必先与版权所有者取得联系并获得正式授权。
# +----------------------------------------------------------------------
# | Author: ChatWork Team <2474369941@qq.com>
# +----------------------------------------------------------------------
from fastapi import APIRouter, Depends
from hypertext import R, PagingResult, response_json
from apps.admin.schemas.apply.draws import prompt_example_schema as schema
from apps.admin.service.apply.draws.prompt_example_service import DrawsPromptExampleService


router = APIRouter(prefix="/prompt_example", tags=["绘画示例接口"])


@router.get("/lists", summary="提示词示例列表", response_model=R[PagingResult[schema.DrawsPromptExampleVo]])
@response_json
async def lists(params: schema.DrawsPromptExampleSearchIn = Depends()):
    return await DrawsPromptExampleService.lists(params)


@router.post("/add", summary="提示词示例新增", response_model=R[dict])
@response_json
async def add(params: schema.DrawsPromptExampleAddIn):
    return await DrawsPromptExampleService.add(params)


@router.post("/edit", summary="提示词示例编辑", response_model=R[dict])
@response_json
async def edit(params: schema.DrawsPromptExampleEditIn):
    return await DrawsPromptExampleService.edit(params)


@router.post("/delete", summary="提示词示例删除", response_model=R[dict])
@response_json
async def delete(params: schema.DrawsPromptExampleDeleteIn):
    return await DrawsPromptExampleService.delete(params.id)
